﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace SmartFactory.Controllers
{
    public class UsersController : Controller
    {
        private readonly IpAddressesConfig _ipAddressesConfig;

        public UsersController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }

        public IActionResult Index()
        {
            return View();
        }

        /// <summary>
        /// 登录页面
        /// </summary>
        /// <returns></returns>
        public IActionResult LoginIndex()
        {
            ViewBag.Darius= _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            return View();
        }
        /// <summary>
        /// 菜单显示页面
        /// </summary>
        /// <returns></returns>
        public IActionResult MenuView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            return View();
        }
        /// <summary>
        /// 权限新增
        /// </summary>
        /// <returns></returns>
        public IActionResult PermissionAddView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            return View();
        }
        /// <summary>
        /// 权限显示
        /// </summary>
        /// <returns></returns>
        public IActionResult PermissionShowView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            return View();
        }
        /// <summary>
        /// 角色新建页面
        /// </summary>
        /// <returns></returns>

        public IActionResult RoleAddView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            return View();
        }
        /// <summary>
        /// 角色显示页面
        /// </summary>
        /// <returns></returns>
        public IActionResult RoleShowView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            return View();
        }
        /// <summary>
        /// 角色弹出页面
        /// </summary>
        /// <returns></returns>
        public IActionResult RoleAlertView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            return View();
        }

        /// <summary>
        /// 用户管理新增
        /// </summary>
        /// <returns></returns>
        public IActionResult UsersAddView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            return View();
        }

        /// <summary>
        /// 用户新增
        /// </summary>
        /// <returns></returns>
        public IActionResult UserAlertView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            return View();
        }
        public IActionResult EmailView()
        {
            ViewBag.Darius = _ipAddressesConfig.Darius;
            ViewBag.Durian = _ipAddressesConfig.Durian;
            ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
            ViewBag.Keep = _ipAddressesConfig.Keep;
            return View();
        }
    }
}
